within ThreeD_MBS_Dynamics.Examples.Snakeboard;

model RodUni
  extends RigidBody;
  parameter SI.Acceleration[3] Gravity;
  parameter SI.Length L;
  parameter SI.Radius r2;
  VisualShape Rod(
    r0={0,0,-L/2},
    Shape="cylinder",
    LengthDirection={0,0,1},
    WidthDirection={1,0,0},
    Length=L,
    Width=2*r2,
    Height=2*r2,
    Material={1,0.5,0.5,0.5});
  WrenchPort InPortJointA annotation (extent=[-10,80; 10,100]);
  annotation (Diagram);
equation
  Rod.S = T;
  Rod.r = r;
  F = m*Gravity + InPortJointA.F;
  M = InPortJointA.M + cross(InPortJointA.P - r, InPortJointA.F);
end RodUni;
